import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';

import { TopicView } from '../../model/topicView'
import { TopicMessage } from '../../model/topicMessage'

/**
 * Generated class for the TopicPage page.
 *
 * See http://ionicframework.com/docs/components/#navigation for more info
 * on Ionic pages and navigation.
 */

@IonicPage()
@Component({
    selector: 'page-topic',
    templateUrl: 'topic.html'
})
export class TopicPage {

    topicView: TopicView;
    topicMessages: TopicMessage[];

    constructor(public navCtrl: NavController, public navParams: NavParams) {
        console.log('TopicPage constructor');
        this.topicView = navParams.data.topicView;
        this.topicMessages = navParams.data.topicMessages;
        console.log(this.topicMessages);
    }

    ionViewDidLoad() {
        console.log('TopicPage ionViewDidLoad');
    }
}
